##定义初始变量
    #set($tableName = $tool.append($tableInfo.name, "ServiceImpl"))
    ##设置回调
    $!callback.setFileName($tool.append($tableName, ".java"))
    $!callback.setSavePath($tool.append($tableInfo.savePath, "/service/impl"))

    ##拿到主键
    #if(!$tableInfo.pkColumn.isEmpty())
    #set($pk = $tableInfo.pkColumn.get(0))
    #end

    #if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.#{end}service.impl;

import $!{tableInfo.savePackageName}.entity.$!{tableInfo.name};
import $!{tableInfo.savePackageName}.dao.$!{tableInfo.name}Mapper;
import $!{tableInfo.savePackageName}.service.$!{tableInfo.name}Service;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * $!{tableInfo.comment}($!{tableInfo.name})表服务实现类
 *
 * @author $!author
 * @since $!time.currTime()
 */
@Service("$!tool.firstLowerCase($!{tableInfo.name})Service")
public class $!{tableName} implements $!{tableInfo.name}Service {
@Resource
private $!{tableInfo.name}Mapper $!tool.firstLowerCase($!{tableInfo.name})Mapper;

/**
 * 通过ID查询单条数据
 *
 * @param $!pk.name 主键
 * @return 实例对象
 */
@Override
public $!{tableInfo.name} selectByPrimaryKey($!pk.shortType $!pk.name) {
    return this.$!{tool.firstLowerCase($!{tableInfo.name})}Mapper.selectByPrimaryKey($!pk.name);
    }
    }